package com.jdbc.transaction_xml;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.mchange.v2.c3p0.ComboPooledDataSource;

public class TestTransaction {
	private ApplicationContext applicationContext = null;
	private BookShopService bookShopService = null;
	{
		applicationContext = new ClassPathXmlApplicationContext("applicationContext_jdbc_xml.xml");
		bookShopService = applicationContext.getBean(BookShopService.class);
	}

	@Test
	public void purchaseTest() {
		bookShopService.purchase("AA", "1001");
	}

}
